package me.aip.mov.controller;


import me.aip.mov.annotation.GlobalResult;
import me.aip.mov.annotation.PassToken;
import me.aip.mov.entity.Appversion;
import me.aip.mov.response.ResponseResult;
import me.aip.mov.service.IAppversionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aip9105
 * @since 2022-02-05
 */
@RestController
@GlobalResult
@RequestMapping("/app")
public class AppController {

    @Autowired
    private IAppversionService appversionService;


    @GetMapping("/checkUpdate")
    @PassToken
    public ResponseResult checkUpdate(Appversion appversion) {
        Appversion app = appversionService.checkUpdate(appversion);
        return ResponseResult.successNoEncrypt(app);
    }

}
